// business helpers

export const ensure_authenticated = (ctx: any) => {
  if (Math.random() > 0.5) {
    throw new Error("Not Authenticated");
  }
};

export const ensure_sso = (ctx: any) => {};

export const get_current_user = (ctx: any) => {
  // return ctx.cookie.session.user;
  return null;
};
